求检查摆锤机器的代码
id: 2566629549 | 楼主:zqh——123 | 返回首页
id: 38245550845
1L | 作者:zqh——123 | 发布于 2013-08-31 13:48

我实在不知道出了什么问题:
Private Sub cmdAnniu_Click()
Dim strQian11wei As String
Dim strR As String, intR As Integer
Dim strD As String, intD As Integer, intD2 As Integer
Dim intDchange As Integer
Dim intDN As Integer
Dim strV As String
Dim strOutput As String
intDN = Val(InputBox("请问你的摆锤把有多长?", "请输入弧度(单位:格)"))
For int1 = 1 To (Len(txtInput.Text) + 2) \ 22
strQian11wei = Mid(txtInput.Text, ((int1 - 1) * 22) + 1, 11)
strR = Mid(txtInput.Text, ((int1 - 1) * 22) + 12, 3)
strD = Mid(txtInput.Text, ((int1 - 1) * 22) + 15, 3)
strV = Mid(txtInput.Text, ((int1 - 1) * 22) + 18, 3)
intR = CInt(strR)
intD = CInt(strD)
intD2 = CInt(strD)
RRR = CInt(strR) \ 32
Do
Select Case intR
Case Is < 10
strOutput = strOutput & strQian11wei & "00" & CStr(intR) & strD & strV & Chr(13) & Chr(10)
Case Is < 100
strOutput = strOutput & strQian11wei & "0" & CStr(intR) & strD & strV & Chr(13) & Chr(10)
Case Else
strOutput = strOutput & strQian11wei & CStr(intR) & strD & strV & Chr(13) & Chr(10)
End Select
intR = intR - 32
Loop Until intR <= 0
intDchange = CInt(ArcSin(16 / (CInt(strR))))
For int8 = 1 To intDN
intD = intD - intDchange * 2
Do While intD < 0
intD = intD + 360
Loop
Do While intD > 999
intD = intD - 360
Loop
Select Case intD
Case Is < 10
strOutput = strOutput & strQian11wei & strR & "00" & CStr(intD) & strV & Chr(13) & Chr(10)
Case Is < 100
strOutput = strOutput & strQian11wei & strR & "0" & CStr(intD) & strV & Chr(13) & Chr(10)
Case Else
strOutput = strOutput & strQian11wei & strR & CStr(intD) & strV & Chr(13) & Chr(10)
End Select
Next
For int3 = 1 To intDN
intD2 = intD2 + intDchange * 2
Do While intD2 < 0
intD2 = intD2 + 360
Loop
Do While intD2 > 999
intD2 = intD2 - 360
Loop
Select Case intD2
Case Is < 10
strOutput = strOutput & strQian11wei & strR & "00" & CStr(intD2) & strV & Chr(13) & Chr(10)
Case Is < 100
strOutput = strOutput & strQian11wei & strR & "0" & CStr(intD2) & strV & Chr(13) & Chr(10)
Case Else
strOutput = strOutput & strQian11wei & strR & CStr(intD2) & strV & Chr(13) & Chr(10)
End Select
Next
Next
txtOutput.Text = strOutput
End Sub

Function ArcSin(n As Double) As Double
ArcSin = Atn(n / Sqr(-(n * n) + 1))
End Function



id: 38245616999
2L | 作者:zqh——123 | 发布于 2013-08-31 13:49

问题:
为什么intDchange总是0?


回复
zqh——123 于 2013-08-31 13:50:16 id: 38245639512
我试过,这个变量的值总是0
祝贺高考成功 于 2013-08-31 14:19:18 id: 38247046861
回复 zqh——123 :你指名intD是什么了么
祝贺高考成功 于 2013-08-31 14:19:26 id: 38247053316
回复 祝贺高考成功 :指明
祝贺高考成功 于 2013-08-31 14:19:51 id: 38247072472
哦当我没说
祝贺高考成功 于 2013-08-31 14:20:46 id: 38247116355
不对不对让我仔细看看


id: 38246084448
3L | 作者:马里奥奥里马 | 发布于 2013-08-31 13:59

全部删掉就好了


id: 38247070262
4L | 作者:zqh——123 | 发布于 2013-08-31 14:19

已经找到了错了

回复
祝贺高考成功 于 2013-08-31 14:22:36 id: 38247202586
你没写intDchange =
zqh——123 于 2013-08-31 14:45:31 id: 38248257121
回复 祝贺高考成功 :写了


id: 38248271335
5L | 作者:zqh——123 | 发布于 2013-08-31 14:45

wentiyizhaodao


id: 38261746945
6L | 作者:123568024 | 发布于 2013-08-31 19:36

看不懂怎么破……


id: 38286605268
7L | 作者:bluesun0505 | 发布于 2013-09-01 08:32

那新版什么时候出来?

回复
zqh——123 于 2013-09-01 22:22:11 id: 38323443888
昨天发布的就是新版